<template>
    <div class="alert" v-show="msg.show">
        <div class="content">
            <section class="title">提示</section>
            <section class="info">{{msg.msg}}</section>
            <section class="btn-group">
                <span @click="msg.btnClick">{{msg.btn}}</span>
            </section>
        </div>
    </div>
</template>

<script>
export default {
    props: {
        msg: Object
    }
 }
</script>

<style scoped lang="scss">
.alert {
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, .1);
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    .content {
        width: 200px;
        background-color: #fff;
        border-radius: 8px;
        .title {
            font-size: 20px;
            border-bottom: 1px solid #ccc;
            padding-left: 20px;
            font-weight: bold;
        }
        .info {
            width: 100%;
            padding: 20px;
        }
        .btn-group {
            border-top: 1px solid #ccc;
            text-align: right;
            span {
                line-height: 30px;
                background-color: orange;
                color: #fff;
                display: block;
                width: 80px;
                text-align: center;
                float: right;
                border-bottom-right-radius: 8px;
            }
        }
    }
}
</style>